<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/


Route::get('/', function () {
    return redirect('order');
});

Route::group(['prefix' => 'order', 'middleware' => ['auth', 'authority']], function () {

    Route::get('/', 'OrderController@index')->name('order.index');
    Route::get('/lease', 'OrderController@lease')->name('order.lease');
    Route::get('/lease/detail/{id}', 'OrderController@lease_detail')->name('order.lease.detail');
    Route::get('/arbitration', 'OrderController@arbitration')->name('order.arbitration');
    Route::get('/arbitration/detail/{id}', 'OrderController@arbitration_detail')->name('order.arbitration.detail');
    Route::post('/arbitration/servicedeal/{id}', 'OrderController@arbitration_servicedeal')->name('order.arbitration.servicedeal');
//    Route::get('/buy', 'OrderController@buy')->name('order.buy');
//    Route::get('/leveling', 'OrderController@leveling')->name('order.leveling');
//    Route::get('/leveling_referee', 'OrderController@leveling_referee')->name('order.leveling_referee');

//    Route::get('/traffic', 'OrderController@traffic')->name('order.traffic');
//    Route::get('/flow', 'OrderController@flow')->name('order.flow');
//    Route::get('/q_coin', 'OrderController@q_coin')->name('order.q_coin');
//    Route::get('/reward', 'OrderController@reward')->name('order.reward');
//    Route::get('/game_coin', 'OrderController@game_coin')->name('order.game_coin');
//    Route::get('/compensate', 'OrderController@compensate')->name('order.compensate');
//    Route::get('/item', 'OrderController@item')->name('order.item');
});


//Route::get('/home', 'HomeController@index')->name('home');

Route::group(['namespace' => 'Auth'], function () {
    Route::get('/login', 'LoginController@showLoginForm')->name('login');
    Route::post('/login', 'LoginController@login');
    Route::post('/logout', 'LoginController@logout')->name('logout');
});


Auth::routes();


Route::get('/jump', 'ErrorController@jump')->name('jump');
